﻿using System.Data.Entity;
using System.Data.Entity.SqlServer;

namespace ContotoUniversityEF6.DAL
{
    public class SchoolConfiguration : DbConfiguration
    {
        /*
            The Entity Framework automatically runs the code it finds in a class that derives from DbConfiguration. 
            You can use the DbConfiguration class to do configuration tasks in code 
            that you would otherwise do in the Web.config file.
        */
        public SchoolConfiguration()
        {
            SetExecutionStrategy("System.Data.SqlClient", () => new SqlAzureExecutionStrategy());
        }
    }
}